
NOTES ON USE OF MICROWARE'S A/BASIC COMPILER, circa version 1.4 -- June 2024

For 6800 FLEX 2/3 OS

INTRODUCTION

   The object code for this compiler was found, disassembled, and initially
commented by Neil Cherry in early 2024: https://github.com/linuxha/RT68mx
   I adapted the ABASICFL.TXT code for my own homemade 6802 computer, which
has SWTBUG for a monitor and the monitor scratch RAM at $7F00 (I did not have
more RAM when building it...), and runs FLEX 3 off of a CF card drive.
   The source code included in this archive (ABASIC14.ZIP) will compile with
William Colley's 'A68' assembler as revised by Herb Johnson in 2022:
https://www.retrotechnology.com/restore/a68.html    Herb has the assembler,
plus a wealth of information on its development and use.

ADAPTATION

   A set of equates are at the top of the assemebly source.  If your system is
using MIKBUG or SWTBUG (which it likely is), all that's necessary is to change
my funky scratchpad RAM addresses back to $A0xx from the $7Fxx I needed to
use.  If you're using a different monitor, equivalent addresses for stuff in
the $E000-E3FF range will be needed, but the FLEX addresses ($A100-BFFF)
should be OK.

THIS PARTICULAR VERSION

   A/BASIC was developed in 1977 by Microware, most famous for OS-9, which
they still support to this day.  It was first intended to be used with their
RT68 real-time clock and monitor software.  As such, an cassette-based
editor -- RTEDIT -- was written for the entry and modification of BASIC
programs.  With FLEX, this editor is unnecessary, and I've found that the
TSC Editor that comes with FLEX is more than adequate (actually convenient)
for program entry and editing.
   No manual seems to exist for this particular version of A/BASIC, which may be thought of as version 1.4. (I say this because I recovered a chess program
on a FLEX 2 disk image that had "SETUP TO RUN WITH A/BASIC V1.4" in its
comment header, and it compiled fine.)  It has all of the features of version
1.0C, and a few of the features of version 2.1.  In this version of A/BASIC:
        * Line numbers are required
        * There is no disk I/O ^^
        * Cassette tape I/O exists, but is of no use with FLEX
        * PEEK and POKE will not accept expressions for addresses
        * STOP returns to FLEX, not the monitor
        * GOTO works on absolute line numbers only
          (not referenced at all in 1.0C manual)
   ^^ - A/BASIC interacts with FLEX only to read in a BASIC source file and
        write a hexidecimal machine code object file.
   BASIC program files prepared with the TSC Editor can be "listed" by setting
up a text capture from the serial terminal emulator and then using FLEX's
LIST command on the text file EDIT generated.  Further, with appropriate line
and character delays, EDIT can read in programs prepared off-line; I use
15 msec character delay and 1000 msec line delays.  Slow, but stable.

COMPILING

   The command is as follows:
                ABASIC,SOURCE.TXT,OBJECT.BIN
   It'll read and write to the current work drive.  That's it.

COMMENT

   It seems to work fine.  Like any compiler, the code it generates isn't all
that compact, but it gets the job done.  Turning on the H and S options as
the first line of the program will produce a really nice, full listing file at
compile time, with a symbol table and the actual machine code.  Just set up a
text capture at the terminal before executing the compile command above.
Now, to speed up that backgammon program...   Best regards, Dave  June 2024
